import request from "../utils/request";

const api_url = `/api/order/orderInfo`

export default {

    //取消订单
    cancelOrder(orderId) {
        return request({
            url: `${api_url}/auth/cancelOrder/${orderId}`,
            method: 'get'
        })
    },

    //订单列表
    getPageList(page, limit, searchObj) {
        return request({
            url: `${api_url}/auth/${page}/${limit}`,
            method: `get`,
            params: searchObj
        })
    },
    //订单状态
    getStatusList() {
        return request({
            url: `${api_url}/auth/getStatusList`,
            method: 'get'
        })
    },

    //订单详情信息
    getOrderDetails(orderId){
        return request({
            url:`${api_url}/auth/getOrdersById/${orderId}`,
            method: "GET",
        })
    },
     //生成订单
    saveOrder(scheduleId,patientId){
        return request({
            url:`${api_url}/auth/submitOrder/${scheduleId}/${patientId}`,
            method: "POST",
        })
    }
}